package com.basker.pisces.auth.autoconfig;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.basker.pisces.auth.context.SimpleLoginContext;
import com.basker.pisces.context.AbstractLoginContextManager;
import com.basker.pisces.context.ILoginContextManager;

@Configuration
public class LoginContextManagerConfiguiration {

    @Bean
    @ConditionalOnMissingBean(ILoginContextManager.class)
    public ILoginContextManager<?> loginContextManager() {
        return new SimpleLoginContextManager();
    }

    static class SimpleLoginContextManager extends AbstractLoginContextManager<SimpleLoginContext> {

    }

}
